import abc
import enum


class LogStatus(metaclass=abc.ABCMeta):
    class MsgType(enum.Enum):
        DEFAULT = 0
        INFO = 1
        IMPORTANT = 2
        WARNING = 3
        ERROR = 4

    def __init__(self):
        pass

    @abc.abstractmethod
    def write(self, msg, type: MsgType = MsgType.DEFAULT):
        """写入"""
        pass

    @abc.abstractmethod
    def backspace(self, count=1):
        pass

    @abc.abstractmethod
    def carriage_return(self):
        """回车"""
        pass

    @abc.abstractmethod
    def line_feed(self):
        """换行"""
        pass


class ProgressStatus(metaclass=abc.ABCMeta):
    def __init__(self):
        pass

    @abc.abstractmethod
    def set_range(self, val):
        pass

    @abc.abstractmethod
    def set_step(self, val):
        pass

    @abc.abstractmethod
    def reset_value(self):
        pass

    @abc.abstractmethod
    def set_value(self, val):
        pass

    @abc.abstractmethod
    def get_value(self):
        return 0

    @abc.abstractmethod
    def increase(self, count=1):
        pass
